add #getQueries method

Added getQueries method to Query class