modifications to comments controller and posts controller