refactoring
Change update functions