support configurable code lengths