Update analyze

Replaced $1-$10 with variables to make code easier to follow
Merge pull request #1 from tgarvin/patch-1

Update analyze