metaprogramming code used at xxix pugpe encounter