decided to use JQuery .each method