add basic funtions to compute folding sequences