Completed functions assignment.