document download functionality added