Theory class encoding exercise