works correctly for correct/error/typeahead inputs