refactoring code-base