improved base plugin API