Updated code after comparing output of clonedigger