move posts to controller