added Query and Entry classes