move functions out of loop
Merge pull request #16 from adobe-webplatform/randy/issue-7

Move functions out of loop