Oops. Accidentally left out some stuff. This is the correct version.