Better @avg assignment