added tests for folding