Finished code for presentation