modified the database abstraction layer with a working copy.