simplified qryMain interface
added test file