changed the cout statement to print encoder.Get