int create_user(const char *name, User **user_ptr_add) {
    User *user_in_list = *user_ptr_add;
    if(strlen(name) >= MAX_NAME){
        return 2;
    }
    
    while(user_in_list != NULL){
        if(strcmp(user_in_list->name, name) == 0){
            return 1;
        }
        else{
            user_in_list = user_in_list->next;
        }
    }

    // at this point, the while loop should have either returned 1 or user_in_list is NULL
    // create new user on the heap so we can access it indefinitely
    User *new_user = malloc(sizeof(User));

    strcpy(new_user->name, name);   // set the name
    new_user->first_post = NULL;    // set the first post to NULL

    for (int i = 0; i < MAX_FRIENDS; i++) { // set to no friends (NULL) for each index
        new_user->friends[i] = NULL;
    }

    if(*user_ptr_add == NULL){      // add the new user to the end of the list as asked
        *user_ptr_add = new_user;
    }
    else{
        user_in_list = *user_ptr_add;   // reinitialize the value
        while(user_in_list->next != NULL){

            user_in_list = user_in_list->next;

        }
        user_in_list->next = new_user;
    }

    // should only be successful at this point
    return 0;

}