Update main.c

Added the option to specify variable name.