introducing onSocket