ending state debug