2/10/2013 revision of change detection algorithm
2/11/2013: revision of change detection