MAINT: add an untested function