refactoring and new abstractions