added add_post method to User class