implemenation of the Sagar protocol