changed priority and leader to *_index
added ability to wait for turn