added two helper functions, getColumnData.m and removeEmptyCells.m