refactored unpack(inputTable)