update: using enumerate

* also removed trailing whitespaces

Signed-off-by: Adrian Matejov <a.matejov@centrum.sk>