very small amount of refactoring