This is the pair of function for Assignment 2