splitting to nested and side-by-side