work on encode package