small changes in design to support 32bit encoders