add method snippet