restructured the codebase