added offset argument for global dimensions

spawn has an new argument, the offset for global dimension
code optimizations