add some tools function.