corrected alignment and mismatch coding