added balanced splitting on last (test) sets