Improved algorithm, average mid range