replaces method in main with corrections