modified posts and profiles controller