modified all the parser functions to take a const char* instead of char* buffer