PDF version of working code