decided to keep exported setRestPath function