add new path algorithm