removed discarded stream feature from code