adapt to recent api changes