As Ben stated, the code already gives the answer I'm looking for, I misunderstood the function and did not interpret the output right, this thread can be locked.