Trying new solution for encoding problem