adding some testing code from codewars.com