Modify code with three nodes It needs to be compile and tested