Added download functionality