worked on issue #3. Added some simple test cases. Need to implement a general one.
fixed issue #3. A test case infrastructure was implemented and a minimal test suite provided.