maybe make this function public as it is documented?