Code written, problems with of stream