2d pointer working