Finished code from session on 12/26/13