snapshot algorithm implemented. third phase debug  [start]