improved encryption to have a key