Look at the first ordered pair: when in this function. This function does not work.