first attempt at movement handling code