added consensus calculator
added consensus calculator
added indices in flags and other stuff
fixed consensus query