added basic code for bouncing off horizontal and vertical walls