modified to array query method