Moved update method in code