collisions working but code is ugly