Update the API to use both class method and instance method.