Started encode method