adding convertASCIIToMessageSegments fn and bug fix in setParityBits fn