updated w/fix to opts2struct