encode complete