Some amendments that allowed to run the code on hadoop cluster