add life cycle manage logic