initialized x to 0.