Implement quality to ensure the right output

X