Tried to write it myself and failed

I guess I don't fully understand what enumerate does and how to properly
use it.