optimization of useless encoders