Moved quorum size calculation into separate method