Moved the testing into a function and tested each corner cell and each cell at the centre of each face.