Replaced qi for qrem, qgen