added xdim option