added plugins logic