Implement effieciency in new encoding scheme