lab4, done with encoding mismatch