Changed ratio from int to double