created more generic pathfinder class