modified to loose the extra ^M