refactored directory