error state added
sample for error state