move some static function from .h to .m

Signed-off-by: Jun <tobefuturer@gmail.com>