Added datatype function