code cleanup msgeneric