Refined solution to #83