added in flag to cancel voice input