fitting in 80
added boundary checking to movement