improved data type handling