download functionality added