added cash-register solution