added sockets support on create
little refactor