refactor using let