A properly indented version of Julian's code to make it easy for everyone to run.