moved some code to SuperSocket