reordered methods to the order in which they are invoked in the main method