Multi-step pattern-recognition: a powerful tool for substance identification based on real-world terahertz-spectra