adapt to new APIs