refactoring can be fun...