updated database creation