added border collision detection and random colors