using stack arrays for uv grid