updated update method
unit tests for the friend controller