refactoring and moving stuff