struct for path nodes again, performance optimization