adding code to sam mismatch