better way to handle collision