added activity lifecycle