Added Q6 code