use enumerate() and fix indents

2 jobs for useenumerate