fix by Siv Raman: moved the move() function to above where it gets called