reworked plugin structure