final working copy Ian and Warren

Here is the working code ?