Completed work

Completed work and tested with one test case.