added entity lifecycle example