made xdim, ydim funcs