refactoring :/