added first wersion of algorithm, sth is wrong with sending clk and tid
to other processes in second iteration of algorithm. Some tids in
receiver are doubled sometimes