work in progress on nested arrays (still crashes with sigsegv)