test with input stream