Updated to use Bijection for encoding