refactored test cases to use let