fixing main method