updated posts controller and views