first version of fold skeleton, untested