add activity life cycle method