Added main method to master.