Add a functioning encoder example