The function seems to remove the last character of the input string if it is not the letter 'N'. 

