minor updates to main method