refactored to support static plugins written in native go