Intelligent design of index insurance for smallholder farmers and pastoralists