added separate class for collision.