allocated space for the null terminating char in getUnfolded