updates to mean computation