updating posts controller