restructed the codebase