add selectQuery method