modify add button handler in traverse_dialog