encoding work and test