restructured for more plugins