can we move this to `tab/utils`?