x and y same dimension