add return value to iostream