fixed not iterating over list