Build function in elem_type, to be improved