changed print option in main to one inline each statement