add method definition snippet