add fold dwim
minor modification