moved queries to queries class