simplified classification building (from jinja to py)