changed return type of generate_characteristic_vectors to array