This function seems unnecessary; it would be better to have the caller compose the two functions themselves.