changed the intersection code back to what worked best