adapt for recent api changes