add update method and create test