remove commented code
rename stream to fd