memory stream utility was simplified