1st Working version -- not  tested.
Working version.