adaptation query for array