Added extra block for checking  queries