added query for each type