comment added to print function
small changes in main program