added basic folding
moved fold apply so folding is immidate
removed folding from master