Can this function be made "private" (e.g., prefix with underscore)? It looks like it's only used by one other function, and not sure how useful it'd be as a standalone public API function.