local client draft
minor refactoring