API for shortest path added