now taking into account 'errored' state