add variable for average