todo notes - especially on Stream code - probably add Close() method