created storeTime method in main activity