how to write a method statement