change each_with_index to each; Remove exception var