Convert main method