Completed both functions.