refactored test suite and work with sockets