added collisionCheck method. Works like a charm, looks ugly