use nodeStack for prepareRoute