fixed collision

much simpler and easier to read now too!