preliminaries to weighted averages