Added dynamic "left" calculation for params hash