updated barcast model averaging code