I changed the quality to be passed as a parameter.