datatype refactoring