fixed avg calculation to floats