Added the activity life cycle