Add moving function

fixed #1