using metaprogramming to automatically generate all the lazy_loader methods