common utility used by Linhai