Indentations problems. Everything inside the else should be indented, as well as everything inside the for.