Implement new encoder structure