Assignment submitted

Some mathematical errors to be fixed later