another approach, no logarithm