replaced param by inv_param in a few places