variable "n" is needed before it was actually created. bug fixed.
Merge pull request #47 from anthonywebb/master

variable "n" is needed before it was actually created. bug fixed.