refactored averages