binairy specific split generation code for slight speed up