#type must be set