asyncmachine query class
refactorings