put code formatting in a method