fixed the define_method