local byzantine algo working almost (ids to fix)