removed leftover self variable
correct conditional assignment syntax
new iter syntax