adding out stream validation
fixing test init