Added test code to figure out encoders