code refactoring beginnig