fixed a little bug: should record current Q ID each loop