trying to get the database code working