Worked further on handling collisions