changing the structure of lifecycle