Refactoring find() method and added update() method