new library for encoding