Update main.c

Added parser function