change detection code added