updated lifecycle example