updated posts controller and relevant views