now using let instead of before each do