almost finished implementing categorical splitter