adding data array on queries