created posts controller and views