added totalWords and toUpperCase