created 2d grid implementation