Added new test code. All instructions have been tested and debugged.