Started move detection code