type signature for removePlugin