NF: new code to slice 4d or 5d data
NF: start cleanup of redundant code in util