As requested, moved slice out of the expandData function and into the calls.