refactor to use new path generation