added retainAllCaps parameter to encode method

boolean parameter to prevent words with all uppercase letters from being excluded even if it belongs to excludedWords array