added test, fixed server accept