add encoder library