bug where ncore number was not passed to subsequent functions. replaced fold with fold2. fold is now deprecated. fold2 is the new fold