New version using hasMoved function