provide transform and previous as helpers on doc instead