so my outer loop is looking at the element at index one to the element of the final index of the raise side minus one and it copies that into this variable current to work with and then this inner loop is doing a down to loop, so it's actually backing up from the position j over starting from where you are to say, well, where does this - it keeps sliding this one down until it's fallen into the right place.