Adding my code and unit test.  The unit test worked 5/5 times when I ran it so both should be good.