Added working collision detecter