modified main function to call parser