avoided explicit allocation of initial x as a vector of zeroes