now using sockets to comunicate to mochad, instead of command line