add local_motion test, and basic algo