some refactoring with mike