make stream a non-static class member