changed the interface to grand averaging