implement sentinel connection algorithm