Implimenation of 2PC in C