some refactoring of the data classes