added support for socks