updated to use plugin