changed setType to public