added ROPE argument for hdiq function