refactored election donut to plugin