move functions to function seciton.