Fixed bug with time. Version is workig but hard to read
Fixed: code is more readable now.
Fixed: more Readable code, fixed bug with time, fixed number of iterations