update in class encoder, added -e for extend and -U for allowunknown. default behaviour changed to no extending