created update_dl_stats, moved lots of things around