Added colision detection