add simple path algorithm