updated database script