updated cmpdiffx with new functionality