adding encoding detector