Created three new methods and called them from the main method