Reworked new symmetry-finding function