improved lifecycle test