refactor shortest path actor