update query to only return required types