alternate solution to #98