Complete the required functions.