refactor path helper and reference