adapted to recent version of pipework