change lower case check to retain capitals of original string