add keys[] array to detect (most not all) transpositions
fix stupid bug