(very) partial dibi wrapper thingy + test (from elsewhere)