make databaseFlag to be standardUserDefaults for checking about data in database