refactoring: wrap_and_encrypt,decrypt_and_find,flip_bits