improved query statements

Some query improvements ;-)