Template classifier working