moved query to filter