move some functions to a anonymous namespace