edited readme and edited costFunctionReg.