Move averaging to the right place