added grid and collision detection, controls