Wrote custom stream utility