cleaned up a little in main again