refactored directory package