added skeleton for shortestpath function