Initial draft of code
-------
Here it is