combine msg

combined six lines into two about msg = None