added some lines form main.c to show.c