change initialize database function and time.