Move the position of a helper function upward.

Other helper functions are put at upper side in the file.