replace toUpperCase by toLowerCase and reduce some lines by refactoring.