Adding setType method