added lifetime management to 'real world' example