before threading
basic protocol working