adapt to latest pkg