completed demo input stream