added errorState