use URL instead of InputStream