use foreach lib for older browsers