improved WSAdapter for stackoverflow example