added puzzle vectorization logic