added add_post function to model