added movement code