new Q logic