minor refactoring, merged update* to set