minor edits, changed theta on line 78 to 117