Tried to implement download function, probably doesn't work