adds folding for python