Made some changes. Added test-cases