Finished second function.