added interpreter for queries