fixed typo in documentation
added iterate
fixed jslint warnings