feature eneration slightly updated (beware: non-compilable state)