finished addPoll api functionality