  Recently, there are many developments on the second main theorem for
holomorphic curves into algebraic varieties intersecting divisors in general
position or subgeneral position. In this paper, we refine the concept of
subgeneral position by introducing the notion of the index of subgeneral
position. With this new notion we give some surprising improvement of the
previous known second main theorem type results. Moreover, via the analogue
between Nevanlinna theory and Diophantine approximation, the corresponding
Schmidt's subspace type theorems are also established in the final section.
