Added incremental validation code from Chunming