using classes and methods to demonstrate modular programming