modified the database script