fix memory leaks
add next ciphertexts