Modularizing the method