moved option.set_type into constructor