update main method