sorting out x- and y- dimensions