set type and default value