implemented q5