added setType helper