new script for on-the-fly downloading