updated posts_controller