changing dbtype function