changed encoder initialization

now the encoders are initialized in the same manner that they are in the
example vi