update to support multiple database