passing the encoding parameter to readLines from our functions