folds chains and funcs