starting refactoring...