moved init of sockets to init