added query to adapter