r19907: this function is used a lot