Created "update" method implementation and test

Created "update" method implementation and the test.