adding generalized peterson generator