added some download functionality