refined solution for bonus question