Update main.c

two functions added,