motor code + sockets