working queries and form