example adapted to the lib