added several functions for string operation