set default values according to datatype