reworking to use stream based callback as much as possible.