Can you figure out what it's doing without looking inside? I might work more on this later. Also, for me it took about 108 seconds to complete.