major progress on the database creation and functions for initial database set up