changes in main to free correctly