see my note above on line 1349 - I think we should not use metaprograming here