added a percentage bar to show program progress
did some minor changes in main.c