simplification of all examples by using parameter constructor with x0 vector