main method fixed