refactored the path