var statement could define multiple variables in one line
implemented for-each loop