use function for generated default messages

why this check?