lifecycle example with slide