implement downloading (not working yet)