cleanup diagram