-changed typeof advance
-re-added the comment about advance arg