changed detection algorithm, changed images
enhanced code