The avg() function is not working