Note that the amended routine is looking at lower case values