actually fix the percentage calculation

had to cast ints as double to get a double result