added getNextHighest function