fixed get_method to handle the *_free() function