refactoring checking name and lower it.