emplementing split/merge
working on (still buggy) merge/split