move some functions to Internal function block