The main method