added constructor
Fixed unit test