update the initialization logic