Added setType method