made an actual name for the encoder, added something before the while loop