Used stream-caching instead of string conversion