Finished third function.