return array for query