moved to a metaprogramming model using instance_eval