more handling around streams. Added statistic object