Added the code to do the real work.