refactored fayPath function