Refactoring and used let() method