Wrote an encoder testing program