works with bufferedReader and PrintWriter now trying with byte streams