Added bestByRange (not yet finished but it works)