diagram of the key optimization cycle