moveQ logic