Replaced method_missing with define_method
Added tests