added set_method method