allow optional doc in transform helper to facilitate transforming previous