refactoring
buggy: client hangs on connect()
done