refactor repo path finding