fixed main method