implemented intersection distance and his test