added classifier function generator