code base refactored