slight change to set $method and $method_val as null