changes from vivek merged, fold pred included
changes from vivek merged, fold pred included