refactor to use let