checking when lmdiff or csdiff is 0