plugin impl and tests