My attempt at getting the encoding to work