Use init method
Added test case