starting creating a encoder