some refactoring with Types