refactored movement code out of player object