replace invalid method