separate the useful functions used by parser
separate the useful functions used by parser