added functionality for 16X16 grid.