Completed function 5.