add "methods" function.