working on new path alorithm