How do you calculate the average molecular weight