improve activity life cycle