wraps movement in function
Merge pull request #1 from ssamakar/movement

wraps movement in function