add method snippet.