Finished work on get_difference_on_extremes. Seems to work as intended.