fixed data handling for different types