callback encode updated