Thanks! Can you now add comments to the function so it's easier to understand? Also please add tests to ensure that the function is working correctly.