some silly refactoring