added functionability for checking flipped edges and twisted corners