adapt new API