adjusted to work with latest core plugin