change the average to integer