added third constructor and the test file.