leader election based on ring structure