Updated

Compiles and works for the test cases I have tested but not for the
error tests