Nearly done
Test code