refactored // repositioned - made things lil' less complex (sacrificed low-level stream-wrapper abstractions)