updated clearChanges