updated controllers to display posts properly