NIR spectroscopy: How it works and how to implement it