changed autoType to setType