updates to the change detection algorithm