added first version of shortest path