thjs path api refactor