collosion detection sorted