adding anti-collision