Third version of my solution for Kata.Potter