Change priority calculation to log scale