Making protocol more generic