re factored constuctor and updated test cases