edit main method