function average of arguments