working on intersection resovling