staple missing error fixed
limited comparision implemented
circular path partially working
not considering the junction points