Pion interview question

refactor and expand code for checkout-kata