had to change elif to else in one spot