change button to yes/no, refactor ajax call