two dimensional empty grid working