reduced main method