add constructor method with parameter