added posts controller and model