added response handling to diary controller