use float instead of int to support decimals in output