---
abstract: 'Measurement of the substellar initial mass function (IMF) in very young clusters is hampered by the possibility of the age spread of cluster members. This is particularly serious for candidate planetary mass objects (PMOs), which have a very similar location to older and more massive brown dwarfs on the Hertzsprung-Russell Diagram (HRD). This degeneracy can be lifted by the measurement of gravity sensitive spectral features. To this end we have obtained medium resolution (R$\approx$5000) Near-infrared Integral Field Spectrometer (NIFS) K band spectra of a sample of late M-/early L-type dwarfs. The sample comprises old field dwarfs and very young brown dwarfs in the Taurus association and in the $\sigma$ Orionis cluster. We demonstrate a positive correlation between the strengths of the 2.21 $\mu$m NaI doublet and the objects’ ages. We demonstrate a further correlation between these objects’ ages and the shape of their K band spectra. We have quantified this correlation in the form of a new index, the H$_{2}$(K) index. This index appears to be more gravity-sensitive than the NaI doublet and has the advantage that it can be computed for spectra where gravity-sensitive spectral lines are unresolved, while it is also more sensitive to surface gravity 