modularized method_missing code a bit