added tableName to queries