complete the initialization of result z