updated build
fixed missing var keyword in for loop