working on queryCode