fixes initailizer and fucntions for valid row and valid column