Index is passed to the function now

Drop recursive multi-dimension loop (code is more ugly...?)
Update README