new changes, fixing readAndEncode