changed parameters from double to Quantity