Renamed variables
Update function encoder()