add the code for returning the average of two points