added main activity
managing the activity lifecycle