Working version after consultation with Lars