removing comments
another way with index
more ruby way, lines.each_with_index