added datatype max and min value functions