Added bool checkCollision method