send the add command to the leader
removed duplicate adding
rewrote adding index to leader