implement debug grid output