migrating to external plugin structure