updated encoding test