added indexing to x.