added in the missing row and column and fixed code to suit