change the way to get InputStream