added data download functionality