added per-observation weights and sum measures