add validation on path length. it grows fast with network size. I don't know wheathere it's validation or model problem