remove reply/error distinction
expand comments; add tests