define _type at start of script