Initial version
Testing has not been performed, but this is the initial guess at how it should be done