Adding download database functionality