adapt to changes suggested by mvidner