added scoping to 'let'