some initial folding, and new apis