Some really terribad code, but it does initially demonstrate what should be going on.